We investigate the case of a homogeneous tachyon field coupled to gravity in a spatially flat Friedman-Robertson-Walker spacetime. Assuming the field evolution to be exponentially decaying with time we solve the field equations and show that, under certain conditions, the scale factor represents an accelerating universe, following a phase of decelerated expansion. We make use of a model of dark energy (with p=-\rho) and dark matter (p=0) where a single scalar field (tachyon) governs the dynamics of both the dark components. We show that this model fits the current supernova data as well as the canonical \LambdaCDM model. We give the bounds on the parameters allowed by the current data.